package com.yj.mvc.web.servlet.view;

import lombok.Builder;
import lombok.Setter;

import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import java.util.Enumeration;

@Setter
public class CustomServletConfig implements ServletConfig {

    private String servletName;
    private ServletContext servletContext;

    private String initParameter;

    private Enumeration<String> initParameterName;

    public CustomServletConfig(ServletContext servletContext){
        this.servletContext = servletContext;
    }

    @Override
    public String getServletName() {
        return this.servletName;
    }

    @Override
    public ServletContext getServletContext() {
        return this.servletContext;
    }

    @Override
    public String getInitParameter(String s) {
        return s;
    }

    @Override
    public Enumeration<String> getInitParameterNames() {
        return this.initParameterName;
    }
}
